﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Pub;

namespace LZQXT.Test.Forms.Cmd
{
    public partial class FCmd : Form
    {
        public FCmd()
        {
            InitializeComponent();
        }

        private void btnRun_Click(object sender, EventArgs e)
        {
            if (cboxCmd.Text != "")
            {
                tboxResult.Text += CCmd.Cmd("cmd /c " + cboxCmd.Text);
            }
        }

        private void FCmd_Load(object sender, EventArgs e)
        {
            tboxResult.Dock = DockStyle.Fill;
            CTextEditMenu menu1 = new CTextEditMenu(tboxResult);
        }

        private void cboxCmd_KeyDown(object sender, KeyEventArgs e)
        {
            if (cboxCmd.Text != "")
            {
                if (e.KeyCode == Keys.Return)
                {
                    btnRun_Click(btnRun, null);
                }
            }
        }

        private void cboxCmd_KeyPress(object sender, KeyPressEventArgs e)
        {

        }
    }
}
